//  老年人能力评估模块

// 分页获取
// 养老设施服务
const serviceFacModel = (request) => {
	return {
		// 全字段查询
		view_dpElderlyAssessment_search(query = {}) {
			return request(`/bussiness/dpElderlyAssessment/search`, {
				method: 'post',
				data: query,
			})
		},
		// 采集
		dpElderlyAssessment_gather(query = {}) {
			return request(`/bussiness/dpElderlyAssessment/gather`, {
				method: 'post',
				data: query,
			})
		},
		// 编辑
		dpElderlyAssessment_edit(query = {}) {
			return request(`/bussiness/dpElderlyAssessment/edit`, {
				method: 'post',
				data: query,
			})
		},
		// 添加
		dpElderlyAssessment_add(query = {}) {
			return request(`/bussiness/dpElderlyAssessment/add`, {
				method: 'post',
				data: query,
			})
		},
		// 分页获取列表
		dpElderlyAssessment_page(query = {}) {
			return request(`/bussiness/dpElderlyAssessment/page`, {
				method: 'post',
				data: query,
			})
		},
		// 通过id查看详情
		dpElderlyAssessment_detail(id) {
			return request(`/bussiness/dpElderlyAssessment/${id}`, {
				method: 'get',
			})
		},
		// 导出
		dpElderlyAssessment_export(query = {}) {
			return request(`/bussiness/dpElderlyAssessment/export`, {
				method: 'post',
				data: query,
			})
		},
		// 通过id删除
		dpElderlyAssessment_del(ids) {
			return request(`/bussiness/dpElderlyAssessment/del`, {
				method: 'post',
				data: {
					batchesDel: ids,
				},
			})
		},
		// 下载模版
		dpElderlyAssessment_downloadTemplate(query = {}) {
			return request(`/bussiness/dpElderlyAssessment/downloadTemplate`, {
				method: 'post',
				responseType: 'blob',
				data: query,
			})
		},
		// 导入
		dpElderlyAssessment_import(query = {}, onUploadProgress) {
			return request(`/bussiness/dpElderlyAssessment/import`, {
				method: 'post',
				headers: {
					'Content-Type': 'multipart/form-data; boundary=something',
				},
				onUploadProgress,
				data: query,
			})
		},
	}
}
export default ({ request }: any) => ({
	...serviceFacModel(request),
})
